import R from 'ramda'

/*
const tsv = [
  ['name',  'age', 'drink'],
  ['john',   23,   'wine'],
  ['maggie', 45,   'water']
]
要求将其转换成如下形式：
[
  {"age": 23, "drink": "wine", "name": "john"},
  {"age": 45, "drink": "water", "name": "maggie"}
]
*/

export const toObjList = R.pipe(
    R.splitAt(1),
    R.apply(R.lift(R.zipObj))
)
